<template>
    <div class="re-header">
        <div class="re-header-item">
            <router-link to="/findmusic/recommend">个性推荐</router-link>
        </div>
        <div class="re-header-item">
            <router-link to="/findmusic">歌单</router-link>
        </div>
        <div class="re-header-item">
            <router-link to="/findmusic">主播电台</router-link>
        </div>
        <div class="re-header-item">
            <router-link to="/findmusic">排行榜</router-link>
        </div>
        <div class="headline"
             :style="line"></div>
    </div>
</template>
<script type="text/ecmascript-6">
export default {
    data() {
        return {}
    },
    props: ['headIndex'],
    computed: {
        line() {
            return {
                left: this.headIndex * 25 +'%'
            }
        }
    }
}
</script>
<style rel="stylesheet/scss" lang="scss">
@import "../../../../static/base/public";
.re-header {
    position: fixed;
    top: 1.3rem;
    left: 0;
    width: 100%;
    color: #000000;
    font-size: 24px;
    text-align: center;
    display: flex;
    line-height: 1rem;
    z-index: 100;
    background: #ffffff;
    .re-header-item {
        @extend %flex-item;
        a {
            color: #000000;
        }
    }
    .headline {
        position: absolute;
        width: 25%;
        height: 1px;
        border-bottom: 4px solid $baseColor;
        bottom: 0;
        left: 0;
    }

    .selected-header {
        border-bottom: 4px solid $baseColor;
        color: $baseColor;
    }
}

[data-dpr='1'] .re-header-item {
    font-size: 12px;
}

[data-dpr='2'] .re-header-item {
    font-size: 24px;
}

[data-dpr='3'] .re-header-item {
    font-size: 36px;
}
</style>
